<?php
class Master_kelas extends CI_Model 
{

	function __construct()
	{
		parent::__construct();
	}

	function kelas($id_m_j_pendidikan)
	{
		$this->db->select('*');
		$this->db->from('m_kelas');
		$this->db->where('id_m_j_pendidikan', $id_m_j_pendidikan);

		$query = $this->db->get();		
		return $query->result();
	}
	
	function save($dataInsert)
	{
		$query = $this->db->insert('m_kelas', $dataInsert);
		return $query;
	}
	
	function edit($id_m_kelas)
	{
		$this->db->where('id_m_kelas',$id_m_kelas);
		$query=$this->db->get('m_kelas');
		return $query->result();
	}
	
	function update($id_m_kelas,$dataUpdate)
	{
		$this->db->where('id_m_kelas', $id_m_kelas);
		$update = $this->db->update('m_kelas', $dataUpdate);
		return $update;
	}	
	
	function delete($id_m_kelas)
	{
		$this->db->where('id_m_kelas', $id_m_kelas);
		$delete = $this->db->delete('m_kelas');
		return $delete;
	}

}